Skip to content

[bugfix] fix get_logger#131

Merged
Jintao-Huang merged 1 commit into
modelscope:mainfrom
Jintao-Huang:fix_get_logger
Jun 18, 2026
Merged

[bugfix] fix get_logger#131
Jintao-Huang merged 1 commit into
modelscope:mainfrom
Jintao-Huang:fix_get_logger

Conversation

@Jintao-Huang

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Fp8Dequantizer initialization to default to a block size of (128, 128) and handle None or 'auto' inputs. It also updates deepseek_v4.py to use block_size='auto' and refactors a logger import in gemma4.py. The review feedback correctly points out a type hint mismatch in Fp8Dequantizer.__init__ where the newly accepted types (None and 'auto') are not reflected in the Tuple[int, int] type annotation, which could trigger static type checker errors.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

class Fp8Dequantizer:

def __init__(self, block_size: Tuple[int, int] = (None, None)):
def __init__(self, block_size: Tuple[int, int] = (128, 128)):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The type annotation for block_size is Tuple[int, int], but the implementation now accepts None and 'auto' as valid inputs. This mismatch will cause static type checkers (like mypy) to report errors. Update the type hint to accurately reflect the allowed types.

Suggested change
def __init__(self, block_size: Tuple[int, int] = (128, 128)):
def __init__(self, block_size: Union[Tuple[Optional[int], Optional[int]], str, None] = (128, 128)):

@Jintao-Huang Jintao-Huang merged commit e7c44f7 into modelscope:main Jun 18, 2026
1 check passed
Jintao-Huang added a commit that referenced this pull request Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants